<!-- 同行评教结果提交 -->
<template>
  <div class="approval-container">

    <div class="search-bar-section" style="margin:0">
      <div>
        <span style="color:rgb(0 76 167)">
          学期：
          <span class="term-select-block">
            <el-select v-model="termForSearch" size="mini" placeholder="请选择" @change="actionHandlerChangeSearchParams">
              <el-option
                v-for="item in termList"
                :key="item.xqmc"
                :label="item.xqmc"
                :value="item.xqmc">
              </el-option>
            </el-select>
          </span>
        </span>
        &nbsp;&nbsp;&nbsp;
        <span style="color:rgb(0 76 167)">
          请选择培养层次：
          <span class="teaching-zhiwei-select-block">
            <el-select v-model="teachingZhiweiForSearch" size="mini" clearable placeholder="请选择" @change="actionHandlerChangeSearchParams">
              <el-option :key="0" label="士官" value="士官"></el-option>
              <el-option :key="1" label="研究生" value="研究生"></el-option>
              <el-option :key="2" label="本科" value="本科"></el-option>
            </el-select>
          </span>
        </span>
        &nbsp;&nbsp;&nbsp;
        <span style="color:rgb(0 76 167)">
          状态：
          <span class="data-status-select-block">
            <el-select v-model="dataStatusForSearch" size="mini" clearable placeholder="请选择">
              <el-option :key="0" label="已提交" value="2"></el-option>
              <el-option :key="1" label="已保存 未提交" value="1"></el-option>
              <el-option :key="2" label="已填写 未保存" value="-1"></el-option>
              <el-option :key="3" label="待填写" value="0"></el-option>
            </el-select>
          </span>
        </span>
        &nbsp;&nbsp;&nbsp;
        <span>
          <div class="search-button" @click="actionHandlerStartSearch" style="position: absolute;display:inline-flex;margin-top:2px">
            <img src="@/assets/assessment/icon-search.png" alt="" style="width:18px;height:18px"/>
            <span>搜索</span>
          </div>
          <!-- <el-button type="primary" icon="el-icon-search" size="mini" style="background-color: #F1F8FE; color: #004CA7;border-radius: 6px;" @click="actionHandlerStartSearch">搜索</el-button> -->
        </span>
      </div>
      <div class="search-bar-buttons-block" style="position: absolute;right: 25px;">
        <span>
          <el-button type="primary" size="mini" style="margin-top:3px;height: 28px;line-height:12px;width: 87px;background-color: #FFF6EF; color: #F3B815; border: 1px solid #F3B815;border-radius: 6px;font-size: 16px;" @click="actionHandlerSaveEvaluationResult">保 存</el-button>
        </span>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <span>
          <el-button type="primary" size="mini" style="margin-top:3px;height: 28px;line-height:12px;width: 87px;background-color: #F1F8FE; color: #004CA7;border-radius: 6px;font-size: 16px;" @click="actionHandlerSubmitEvaluationResult">提 交</el-button>
        </span>
      </div>
    </div>

    <div class="evaluation-entry-table-container">
      <el-table
        ref="evaluationTable"
        :data="tableData"
        v-loading="ifTableLoading"
        :span-method="calculateTableSpan"
        style="width: 100%"
        class="xpaas-table-class"
        row-class-name="xpaas-row-class"
        cell-class-name="xpaas-cell-class"
        header-row-class-name="xpaas-header-row-class"
        header-cell-class-name="xpaas-header-cell-class"
        @selection-change="actionHandlerChangeSelection"
      >
        <el-table-column
          type="selection"
          width="55">
        </el-table-column>
        <el-table-column
          prop="sftjText"
          label="状态"
          width=""
          align="center"
          class-name=""
          label-class-name=""
        ></el-table-column>
        <el-table-column
          prop="zhiwei"
          label="培养层次"
          width=""
          align="center"
          class-name=""
          label-class-name=""
        ></el-table-column>
        <el-table-column
          prop="zhiweilevel"
          label="职称"
          width=""
          align="center"
          class-name=""
          label-class-name=""
        ></el-table-column>

        <el-table-column
          prop="jyroom"
          label="教研室"
          width=""
          align="center"
          class-name=""
          label-class-name=""
        ></el-table-column>
        <el-table-column
          prop="teachername"
          label="教员姓名"
          width=""
          align="center"
          class-name=""
          label-class-name=""
        ></el-table-column>
        <el-table-column
          prop="cdkc"
          label="承担课程"
          width=""
          align="center"
          class-name=""
          label-class-name=""
        ></el-table-column>
        <el-table-column
          prop="zybc"
          label="教学班"
          width=""
          align="center"
          class-name=""
          label-class-name=""
        ></el-table-column>
        <el-table-column
          prop="cdxs"
          label="承担学时"
          width=""
          align="center"
          class-name=""
          label-class-name=""
        ></el-table-column>

        <el-table-column
          prop="tolxs"
          label="承担总学时"
          width=""
          align="center"
          class-name=""
          label-class-name=""
        >
          <template slot-scope="scope">
            <div v-if="scope.row.sftj == 2 || scope.row.sftj == 3">
              {{scope.row.tolxs}}
            </div>
            <div v-else>
              <el-input v-model="scope.row.tolxs" type="number" @change="actionHandlerChangeRowData(scope)"></el-input>
            </div>
          </template>
        </el-table-column>
        <el-table-column
          prop="thpjdj"
          label="同行评价等级"
          width=""
          align="center"
          class-name=""
          label-class-name=""
        >
          <template slot-scope="scope">
            <div v-if="scope.row.sftj == 2 || scope.row.sftj == 3">
              {{scope.row.thpjdj}}
            </div>
            <div v-else>
              <el-select v-model="scope.row.thpjdj" clearable placeholder="请选择" @change="actionHandlerChangeRowData(scope)">
                <el-option :key="1" label="A" value="A"></el-option>
                <el-option :key="2" label="B" value="B"></el-option>
                <el-option :key="3" label="C" value="C"></el-option>
                <el-option :key="4" label="D" value="D"></el-option>
              </el-select>
            </div>
          </template>
        </el-table-column>
        <el-table-column
          prop="thpf"
          label="同行评分"
          width=""
          align="center"
          class-name=""
          label-class-name=""
        >
          <template slot-scope="scope">
            <div v-if="scope.row.sftj == 2 || scope.row.sftj == 3">
              {{scope.row.thpf}}
            </div>
            <div v-else>
              <el-input v-model="scope.row.thpf" type="number" @change="actionHandlerChangeRowData(scope)"></el-input>
            </div>
          </template>
        </el-table-column>
      </el-table>
    </div>

    <div>
      <div class="bottom-block">
        <div class="export-button">
          <img src="../../../../assets/assessment/icon-export.png" alt="" />
          <download-excel
            class="export-btn"
            :data="selectedTableData"
            :fields="fieldsToExport"
            type="xls"
            name="同行评教结果查看.xls"
            style="color: #f3b815"
            >
            &ensp;导出Excel
          </download-excel>
        </div>
      </div>
    </div>
    
  </div>
</template>

<script>
import { mapGetters } from "vuex";
import {
  fetchUnevaluatedCourses,
  updateSzhzBatch
} from "@/api/teacher/admin";

import {
  reqGetXqList
} from "@/api/course/courses";
import { Message } from 'element-ui';

export default {
  data() {
    return {
      termList: [],

      teachingZhiweiForSearch: '',
      termForSearch: '',
      dataStatusForSearchText: '',
      dataStatusForSearch: '',

      ifTableLoading: true,
      tableData: [],
      selectedTableData: [],
      changedTableData: new Set(),

      fieldsToExport: {
        '状态': 'sftj',
        '培养层次': 'zhiwei',
        '职称': 'zhiweilevel',
        '教研室': 'jyroom',
        '教员姓名': 'teachername',
        '承担课程': 'cdkc',
        '教学班': 'zybc',
        '承担学时': 'cdxs'
      },

      rowSpanMatrix: []
    };
  },
  computed: {
    ...mapGetters(["userInfo"])
  },
  mounted() {
    this.initPageData();
  },
  methods: {
    actionHandlerStartSearch() {
      this.fetchUnevaluatedCourses();
    },

    refreshTableData() {
      this.fetchUnevaluatedCourses();
    },

    fetchUnevaluatedCourses() {

      if (this.dataStatusForSearch == -1) {
        let dataList = this.tableData || [];
        dataList = dataList.filter(item => this.changedTableData.has(item.teacherid));
        this.tableData = dataList;
        return;
      }

      this.ifTableLoading = true;
      let params = {xueqi: this.termForSearch, zhiwei:this.teachingZhiweiForSearch, sftj: this.dataStatusForSearch};
      return new Promise(() => {
        fetchUnevaluatedCourses(params).then(res => {
          this.ifTableLoading = false;
          this.changedTableData = new Set();
          if (res.data.success) {
            let dataList = res.data.data || [];
            if (!Array.isArray(dataList)) {
              dataList = [];
            }
            this.fillDataStatusText(dataList);
            this.tableData = dataList;
            this.generateRowSpanMatrix();
          }else {
            this.tableData = [];
            Message({ message: message, type: 'error' });
          }
        }).catch(err => {
          this.ifTableLoading = false;
        });
      });
    },

    fillDataStatusText(dataList) {
      dataList.forEach((item) => {
        switch (item.sftj) {
          case "0":
            item.sftjText = '待填写';
            break;
          case "1":
            item.sftjText = '已保存'
            break;
          case "2":
            item.sftjText = '已提交';
            break;
          case "3":
            item.sftjText = '已发布';
            break;
          default:
            item.sftjText = '';
            break;
        }
      });
    },

    generateRowSpanMatrix() {
      let dataList = this.tableData || [];
      let rowSpanMatrix = new Array(dataList.length);
      let currentValue = null;
      let currentIdx = null;
      let currentCnt = 0;
      for (let i = 0; i < dataList.length; i++) {
        rowSpanMatrix[i] = 0;
        if (currentValue != dataList[i].teacherid) {
          rowSpanMatrix[currentIdx] = currentCnt;
          currentValue = dataList[i].teacherid;
          currentIdx = i;
          currentCnt = 1;
        }else {
          currentCnt++;
        } 
      }
      rowSpanMatrix[currentIdx] = currentCnt;
      this.rowSpanMatrix = rowSpanMatrix;
    },

    initPageData() {
      this.fetchTerms();
    },

    fetchTerms() {
      return new Promise(() => {
        reqGetXqList().then(res => {
          if (res.data.success) {
            this.termList = res.data.data || [];
            if (this.termList.length > 0) {
              this.termForSearch = this.termList[0].xqmc;
            }
            //
            this.fetchUnevaluatedCourses();
          }
        });
      });
    },

    actionHandlerSaveEvaluationResult() {
      let recordList = this.tableData || [];
      recordList = recordList.filter(record => record.sftj == "0");

      let listToSave = new Array();
      recordList.forEach(record => {
        listToSave.push({ id: record.id, tolxs: record.tolxs, thpf: record.thpf, thpjdj: record.thpjdj, sftj: 1 });
      });

      if (listToSave.length > 0) {
        updateSzhzBatch(listToSave).then(res => {
          if (res.data.success) {
            Message({ message: '保存成功', type: 'success' });
            this.refreshTableData();
          }else {
            Message({ message: '保存失败', type: 'error' });
          }
        });
      }else {
        this.refreshTableData();
      }
    },

    actionHandlerSubmitEvaluationResult() {
      //this.actionHandlerSaveEvaluationResult();
      let recordList = this.tableData || [];
      recordList = recordList.filter(record => record.sftj == "0");

      let listToSave = new Array();
      
      recordList.forEach(record => {
        listToSave.push({ id: record.id, tolxs: record.tolxs, thpf: record.thpf, thpjdj: record.thpjdj, sftj: 2 });
      });

      recordList = this.tableData || [];
      recordList = recordList.filter(record => record.sftj == "1");

      recordList.forEach(record => {
        listToSave.push({ id: record.id, sftj: 2 });
      });

      if (listToSave.length > 0) {
        updateSzhzBatch(listToSave).then(res => {
          if (res.data.success) {
            Message({ message: '保存成功', type: 'success' });
            this.refreshTableData();
          }else {
            Message({ message: '保存失败', type: 'error' });
          }
        });
      }else {
        this.refreshTableData();
      }
    },

    actionHandlerChangeSelection() {
      let selectedList = this.$refs.evaluationTable.selection || [];
      let selectedTeacherIds = selectedList.map(item => item.teacherid);
      this.selectedTableData = this.tableData.filter(item => (selectedTeacherIds.indexOf(item.teacherid) >= 0));
    },

    actionHandlerChangeRowData(scope) {
      this.changedTableData.add(scope.row.teacherid);
    },

    actionHandlerChangeSearchParams() {
      this.dataStatusForSearch = '';
      this.dataStatusForSearchText = '';
    },

    calculateTableSpan(cell) {
      if ([1, 2, 3, 4, 5, 8, 9, 10, 11].indexOf(cell.columnIndex) >= 0) {
        let rowSpanValue = this.rowSpanMatrix[cell.rowIndex];
        return [rowSpanValue, (rowSpanValue==0)?0:1];
      }else {
        return [1, 1];
      }
    }
  }
};
</script>

<style lang="scss" scoped>
.search-button {
  width: 77px;
  height: 28px;
  line-height: 28px;
  background: #f1f8fe;
  border: 1px solid #51aef6;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  > span {
    font-size: 16px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #51aef6;
  }
  > img {
    width: 20px;
    height: 20px;
    margin-right: 4px;
  }
}
  .search-bar-section {
    margin-top: 30px;
    height: 50px;
    //border: 1px solid #004CA7;
    //border-radius: 5px;
    padding: 0px 5px;
    display: flex;
    justify-content: space-between;
    .search-bar-buttons-block {
      display: flex;
      align-items: center;
      padding-right: 5px;
    }
    .term-select-block {
      display: inline-block;
      width: 100px;
    }
    .teaching-zhiwei-select-block {
      display: inline-block;
      width: 100px;
    }
    .data-status-select-block {
      display: inline-block;
      width: 200px;
    }
  }

  .evaluation-entry-table-container {
    .el-table--border {
      border: 1px solid #004CA7;
      border-radius: 5px;
    }
    table thead tr th {
      background-color: rgb(241, 248, 254);
    }
  }

  

  .el-table {
    thead {
      color: #004CA7;
    }
  }

  .search-bar-section {
    .el-select {
      .el-input__inner {
        height: 25px;
      }
      .el-input__icon {
        line-height: 25px;
      }
    }
  }

  .export-button {
      margin-top: 14px;
      width: 127px;
      height: 27px;
      border: 1px solid #f3b815;

      // background: #ebe6ff;

      background: #fff6ef;
      //border: 1px solid #5230e9;
      // width: auto;
      height: 28px;
      line-height: 28px;
      border-radius: 6px;
      // cursor: pointer;
      display: inline-flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;
      box-sizing: border-box;

      > span {
        font-size: 14px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #f3b815;
      }

      > img {
        width: 16px;
        height: 16px;
        margin-right: 5px;
      }

      .export-btn {
        cursor: pointer;
      }
    }

  // .search-bar-cell .el-select  .el-input--suffix {
  //   background-color: red;
  //   height: 30px;
  // }
</style>

<style scoped lang="less">
@fontFamily:"Microsoft YaHei";
.xpaas-table-class {
  border: 1px solid #004ca7;
  border-radius: 9px;
  margin: 15px 0;
  > ::v-deep div.el-table__header-wrapper {
    > table.el-table__header {
      > thead {
        > tr.xpaas-header-row-class {
          padding: 0;
          height: 76px;
          background-color: #edf2f9;
          font-size: 16px;
          font-family: Microsoft YaHei;
          font-weight: bold;
          line-height: 20px;
          color: #004ca7;
          > th.xpaas-header-cell-class {
            font-weight: bold;
            border-right: 1px solid #c7d7eb;
            border-left: 0;
            border-bottom: 1px solid #c7d7eb;
            background-color: #edf2f9;
            > div.cell {
              font-size: 16px;
              font-weight: bold;
              font-family: @fontFamily;
              color: #004ca7;
            }
          }
        }
      }
    }
  }
  > ::v-deep div.el-table__body-wrapper {
    > table.el-table__body {
      > tbody {
        > tr.xpaas-row-class {
          > td.xpaas-header-cell-class {
            border-right: 1px solid #c7d7eb;
            border-left: 0;
            border-bottom: 1px solid #c7d7eb;
            background-color: #edf2f9;
            > div.cell {
              font-size: 16px;
              font-weight: bold;
              font-family: @fontFamily;
              color: #004ca7;
            }
          }
          > td.xpaas-cell-class {
            height: 76px;
            border-right: 1px solid #c7d7eb;
            border-left: 0;
            border-bottom: 1px solid #c7d7eb;
            > div.cell {
              font-weight: normal;
              font-family: @fontFamily;
              color: #004ca7;
            }
          }
        }
      }
    }
  }
}
</style>
<!-- <style lang="less" scoped>
.approval-container {
  .back-container {
    .back-text {
      margin-top: 33px;

      > div {
        display: inline-block;

        &:nth-child(1) {
          padding-left: 111px;
          font-size: 20px;
          color: rgba(0, 76, 167, 1);
          font-weight: bold;
          vertical-align: top;
        }
      }
    }

    .el-dialog__footer {
      padding-bottom: 95px;
    }
  }
  .manual-entry-container {
    .el-dialog__body {
      height: 390px;
      > div {
        width: 1014px;
        border: 1px solid rgba(0, 76, 167, 0.8);
        border-radius: 6px;
        margin: 0 auto;
        > div {
          border-bottom: 1px solid rgba(0, 76, 167, 0.39);
          &:last-child {
            border-bottom: none;
          }
          > div {
            display: flex;
            > div {
              height: 96px;
              display: flex;
              align-items: center;
              justify-content: center;
              &:nth-child(1) {
                width: 420px;
                text-align: center;
                font-size: 16px;
                font-weight: bold;
                color: #004ca7;
                background: rgba(77, 129, 192, 0.1);
              }
              &:nth-child(2) {
                padding-left: 19px;
              }
            }
          }
        }
      }
    }
    .el-dialog__footer {
      padding-bottom: 43px;
    }
    .dialog-footer {
      > button {
        width: 87px;
        height: 36px;
        background: #fff6ef;
        border: 1px solid #f3b815;
        border-radius: 6px;
        background: rgba(255, 246, 239, 1);
        font-size: 18px;
        color: #f3b815;
      }
    }
  }
  .message-container {
    .message-text {
      > div {
        padding: 57px 0 63px 0;
        font-size: 18px;
        font-family: Microsoft YaHei;
        font-weight: bold;
        line-height: 20px;
        color: #004ca7;
        text-align: center;
      }
    }

    .el-dialog__footer {
      padding-bottom: 95px;
      display: flex;
      justify-content: space-evenly;
    }
  }

  .paper-message-container {
    .paper-message-text {
      > div {
        padding: 57px 0 63px 0;
        font-size: 18px;
        font-family: Microsoft YaHei;
        font-weight: bold;
        line-height: 20px;
        color: #004ca7;
        text-align: center;
      }
    }

    .el-dialog__footer {
      padding-bottom: 95px;
    }

    .confirm-button {
      width: 87px;
      height: 36px;
      padding: 0;
      background: #f1fff8;
      border: 1px solid #02c86c;
      border-radius: 4px;
      font-size: 18px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #02c86c;
      cursor: pointer;
      margin-right: 92px;
    }

    .cancle-button {
      .confirm-button;
      background: #fff6ef;
      border: 1px solid #f3b815;
      color: #f3b815;
      margin-right: 0px;
    }
  }

  .upload-paper-container {
    .paper-container {
      width: 100%;
      height: 236px;
      opacity: 1;

      .paper-container-row {
        display: flex;
        flex-direction: row;
        align-items: center;
        font-family: Microsoft YaHei;

        margin-bottom: 35px;
        border: 1px solid #004ca7;

        .paper-container-box1 {
          width: 233px;
          height: 126px;
          background: rgba(0, 76, 167, 0.1);
          opacity: 0.1;
          border-radius: 5px 0px 0px 0px;
          display: flex;
          align-items: center;
          justify-content: center;

          .title {
            width: 90px;
            height: 24px;
            font-size: 18px;
            font-family: Microsoft YaHei;
            font-weight: bold;
            line-height: 20px;
            color: rgba(0, 76, 167, 1);
            opacity: 1;
          }
        }

        .paper-container-box2 {
          margin-left: 15px;
        }

        .upload-button {
        }

        .file-name {
          max-width: 340px;
          margin-right: 10px;
        }

        .scan-button {
          width: 62px;
          height: 28px;
          line-height: 28px;
          background: #fff6ef;
          border: 1px solid #f3b815;
          border-radius: 4px;
          font-size: 16px;
          font-family: Microsoft YaHei;
          font-weight: 400;
          color: #f3b815;
          text-align: center;
          cursor: pointer;
        }

        .download-button {
          .scan-button;
          background: #f1f8fe;
          border: 1px solid #51aef6;
          color: #51aef6;
        }

        img {
          width: 18px;
          height: 19px;
          margin-right: 14px;
        }

        .re-upload-button {
          .upload-button;
          width: 80px;
          color: #02c86c;
          border: 1px solid #02c86c;
          background: #dfffef;

          input {
            width: 80px;
          }
        }
      }
    }

    .el-dialog__footer {
      padding-bottom: 95px;
    }

    .confirm-button {
      width: 87px;
      height: 36px;
      padding: 0;
      background: rgba(90, 101, 204, 0.1);
      border: 1px solid #5230e9;
      border-radius: 4px;
      font-size: 18px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #5230e9;
      cursor: pointer;
      margin-right: 92px;
    }

    .cancle-button {
      .confirm-button;
      background: #ffefef;
      border: 1px solid #ff3819;
      color: #ff3819;
      margin-right: 0px;
    }

    .download-button {
      .confirm-button;
      background: #f1f8fe;
      border: 1px solid #51aef6;
      color: #51aef6;
      margin-right: 92px;
    }
  }

  .plan-entry-table-container {
    margin-top: 30px;

    .el-table td,
    .el-table th.is-leaf,
    .el-table--border,
    .el-table--group {
      border-color: #c7d7eb;
    }

    .el-table__header tr,
    .el-table__header th {
      padding: 0;
      height: 76px;
      background-color: #edf2f9;
      font-size: 16px;
      font-family: Microsoft YaHei;
      font-weight: bold;
      line-height: 20px;
      color: #004ca7;
    }

    .el-table__body tr,
    .el-table__body td {
      padding: 0;
      height: 86px;
    }

    .export-button {
      background: #ebe6ff;

      cursor: pointer;

      background: #fff6ef;
      border: 1px solid #5230e9;
      width: auto;
      height: 28px;
      line-height: 28px;
      border-radius: 6px;
      cursor: pointer;
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;
      box-sizing: border-box;

      > span {
        font-size: 14px;
        font-family: Microsoft YaHei;
        font-weight: 400;
        color: #f3b815;
      }

      > img {
        width: 16px;
        height: 16px;
        margin-right: 5px;
      }
    }

    .bk-lucj-import-button {
      .export-button;
      width: 70px;
      background: #f1fff8;
      border: 1px solid #02c86c;
      box-sizing: border-box;
      margin: 0 auto 12px;

      &:last-child {
        margin-bottom: 0px;
      }

      > span {
        color: #02c86c;
      }
    }

    .bk-lucj-expot-button {
      .export-button;
      width: 156px;
      background: #fef1e8;
      border: 1px solid #f86900;
      box-sizing: border-box;
      margin: 0 auto 12px;

      &:last-child {
        margin-bottom: 0px;
      }

      > span {
        color: #f86900;
      }
    }

    .tjst-button {
      width: 78px;
      height: 27px;
      line-height: 27px;
      background: #f1f8fe;
      border: 1px solid #51aef6;
      border-radius: 4px;
      text-align: center;
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #51aef6;
      cursor: pointer;
    }

    .dh-button {
      .tjst-button;
      margin-top: 12px;
      background: #ffefef;
      border: 1px solid #ff3819;
      color: #ff3819;
    }

    .cx-button {
      .tjst-button;
      background: #ffefef;
      border: 1px solid #ff3819;
      color: #ff3819;
    }

    .cz-block {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }

    .txmtjh-button {
      .tjst-button;
      width: 114px;
      background: #fff6ef;
      border: 1px solid #f3b815;
      color: #f3b815;
    }

    .ckmtjh-button {
      .tjst-button;
      width: 114px;
      background: #f1fff8;
      border: 1px solid #02c86c;
      color: #02c86c;
    }

    .xz-button {
      .tjst-button;
      width: 51px;
      background: #edf2f9;
      border: 1px solid #004ca7;
      color: #004ca7;
    }

    .name-button {
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      line-height: 25px;
      color: #004ca7;
      text-decoration: underline;
    }

    .name-button:hover {
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: bold;
      line-height: 25px;
      color: #187ef8;
    }

    .upload-button {
      .tjst-button;
      width: 98px;
      margin: 0 5px;
      background: #efebff;
      border: 1px solid #5230e9;
      color: #5230e9;
    }

    .download-button {
      .tjst-button;
      width: 48px;
      margin: 0 5px;
    }

    .yl-button {
      .tjst-button;
      width: 48px;
      margin: 0 5px;
      background: #fff6ef;
      border: 1px solid #f3b815;
      color: #f3b815;
    }

    .cz-row-block {
      display: flex;
      flex-direction: row;
      justify-content: space-evenly;
      align-items: center;
      .download-buttones {
        align-items: center;
        width: 78px;
        height: 28px;
        line-height: 28px;
        background: #efebff;
        border: 1px solid #5230e9;

        border-radius: 6px;
        cursor: pointer;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;

        > span {
          font-size: 16px;
          font-family: Microsoft YaHei;
          font-weight: 400;
          color: #5230e9;
        }
        > img {
          width: 16px;
          height: 16px;
          margin-right: 10px;
        }
      }
      .download-buttons {
        align-items: center;
        width: 78px;
        height: 28px;
        line-height: 28px;
        background: #ffefef;
        border: 1px solid #ff3819;
        border-radius: 6px;
        cursor: pointer;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;

        > span {
          font-size: 16px;
          font-family: Microsoft YaHei;
          font-weight: 400;
          color: #fb563c;
        }
        > img {
          width: 16px;
          height: 16px;
          margin-right: 10px;
        }
      }
      .ztcz-detail {
        .download-buttons;
        background: #f1fff8;
        border: 1px solid #02c86c;
        > span {
          font-size: 16px;
          font-family: Microsoft YaHei;
          font-weight: 400;
          color: #02c86c;
        }
      }
    }

    .zz-button {
      .tjst-button;
      width: 132px;
      margin: 5px;
      background: #efebff;
      border: 1px solid #5230e9;
      color: #5230e9;
    }

    .tx-button {
      .tjst-button;
      width: 132px;
      letter-spacing: 2px;
      margin: 0 5px;
      background: #f1f8fe;
      border: 1px solid #51aef6;
      color: #51aef6;
    }

    .sjfx-button {
      .tjst-button;
      width: 114px;
      margin: 0 5px;
      background: #fff6ef;
      border: 1px solid #f3b815;
      color: #f3b815;
    }
  }

  .manual-entry-containerass {
    .el-dialog__body {
      > div {
        width: 1014px;
        border: 1px solid rgba(0, 76, 167, 0.8);
        border-radius: 6px;
        margin: 0 auto;
        > div {
          border-bottom: 1px solid rgba(0, 76, 167, 0.39);
          &:last-child {
            border-bottom: none;
          }
          > div {
            display: flex;
            > div {
              width: 900px;
              height: 96px;
              display: flex;
              align-items: center;
              justify-content: center;
              &:nth-child(1) {
                width: 420px;
                text-align: center;
                font-size: 16px;
                font-weight: bold;
                color: #004ca7;
                background: rgba(77, 129, 192, 0.1);
              }
              &:nth-child(2) {
                padding-left: 19px;
              }
            }
          }
        }
      }
    }
    .el-dialog__footer {
      padding-bottom: 43px;
    }
    .dialog-footer {
      > button {
        width: 87px;
        height: 36px;
        background: #fff6ef;
        border: 1px solid #f3b815;
        border-radius: 6px;
        background: rgba(255, 246, 239, 1);
        font-size: 18px;
        color: #f3b815;
      }
    }
  }
  .pagination-block {
    margin-top: 20px;
    display: flex;
    flex-direction: row;
    justify-content: center;
  }
}
</style>

<style lang="less" scoped>
@import "../../../../styles/approval.less";

.plan-entry-table-container {
  margin-top: 30px;

  .table-data {
    width: 100%;
    border: 0.8px solid #004ca7;
    border-radius: 9px;
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #004ca7;
  }
}
</style> -->
